Applying anti-aliasing

You can enable anti-aliasing to an entire Kanzi application, or reduce aliasing in selected nodes by applying supersampling. If most of the content in your application requires anti-aliasing, applying anti-aliasing to the entire application provides better performance. If only parts of your application require anti-aliasing, use supersampling only on those parts that need it.

Applying anti-aliasing to the entire application

When you apply anti-aliasing to the entire application you set the number of anti-aliasing surface samples you want to use. Because this value depends on the device on which you want to run your Kanzi application, check the documentation of that device for supported values.

To apply anti-aliasing to the entire application:

See Reference for application configuration.

Reducing aliasing in selected nodes

If only parts of your application require anti-aliasing, use supersampling only on those parts that need it.

To reduce aliasing in selected nodes:

  1. In the Library press Alt and right-click Materials and Textures, and select Render Target Texture. See Using render target textures.
    This is the texture to which you render the contents of the node for which you want to reduce aliasing.
  2. In the Properties set:
    • Height and Width of the render target texture to the same values you use for the node for which you want to reduce aliasing.
      For example, use the values that are double the size of the final size of the content for which you want to reduce aliasing. You need to use high values, because you scale down this texture and that way smooth the rough edges that cause aliasing.
    • Mipmap Mode to Base
    • Format to RGBA (8-bit)
  3. In the Project select the node for which you want to reduce aliasing, and in the Properties add and set:
    1. Off-Screen Rendering and enable the property.
    2. Render Target to the render target texture you created in the first step.
  4. In the Project press Alt and right-click the node where you want to show the content with reduced aliasing, and select Image.
  5. In the Properties set:
    1. Image property to the render target texture you created in the first step and to which you render the content where you want to reduce aliasing.
    2. Layout Height and Layout Width to the half of the Height and Width of the render target texture properties.

See also

Reference for application configuration

Using render target textures

Rendering best practices